from flask import session
import logging
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import creat_app,db,models

#通过制定的配置名字创建对应配置的app
#create_app 类似于共藏方法
app = creat_app("development")
manager = Manager(app)
#将迁移的命令添加到manager中
Migrate(app, db)
manager.add_command('db', MigrateCommand)


if __name__ == "__main__":
    manager.run()